Optimal. Leaf size=85 \[ -\frac {a^2}{4 d (1-\cos (c+d x))^2}+\frac {5 a^2}{4 d (1-\cos (c+d x))}+\frac {7 a^2 \log (1-\cos (c+d x))}{8 d}+\frac {a^2 \log (1+\cos (c+d x))}{8 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3964, 90}
\begin {gather*} \frac {5 a^2}{4 d (1-\cos (c+d x))}-\frac {a^2}{4 d (1-\cos (c+d x))^2}+\frac {7 a^2 \log (1-\cos (c+d x))}{8 d}+\frac {a^2 \log (\cos (c+d x)+1)}{8 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 90
Rule 3964
Rubi steps
\begin {align*} \int \cot ^5(c+d x) (a+a \sec (c+d x))^2 \, dx &=-\frac {a^6 \text {Subst}\left (\int \frac {x^3}{(a-a x)^3 (a+a x)} \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {a^6 \text {Subst}\left (\int \left (-\frac {1}{2 a^4 (-1+x)^3}-\frac {5}{4 a^4 (-1+x)^2}-\frac {7}{8 a^4 (-1+x)}-\frac {1}{8 a^4 (1+x)}\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {a^2}{4 d (1-\cos (c+d x))^2}+\frac {5 a^2}{4 d (1-\cos (c+d x))}+\frac {7 a^2 \log (1-\cos (c+d x))}{8 d}+\frac {a^2 \log (1+\cos (c+d x))}{8 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.29, size = 86, normalized size = 1.01 \begin {gather*} -\frac {a^2 (1+\cos (c+d x))^2 \left (-10 \csc ^2\left (\frac {1}{2} (c+d x)\right )+\csc ^4\left (\frac {1}{2} (c+d x)\right )-4 \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+7 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )\right ) \sec ^4\left (\frac {1}{2} (c+d x)\right )}{64 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 63, normalized size = 0.74
method | result | size |
derivativedivides | \(-\frac {a^{2} \left (-\frac {\ln \left (1+\sec \left (d x +c \right )\right )}{8}+\frac {1}{4 \left (-1+\sec \left (d x +c \right )\right )^{2}}-\frac {3}{4 \left (-1+\sec \left (d x +c \right )\right )}-\frac {7 \ln \left (-1+\sec \left (d x +c \right )\right )}{8}+\ln \left (\sec \left (d x +c \right )\right )\right )}{d}\) | \(63\) |
default | \(-\frac {a^{2} \left (-\frac {\ln \left (1+\sec \left (d x +c \right )\right )}{8}+\frac {1}{4 \left (-1+\sec \left (d x +c \right )\right )^{2}}-\frac {3}{4 \left (-1+\sec \left (d x +c \right )\right )}-\frac {7 \ln \left (-1+\sec \left (d x +c \right )\right )}{8}+\ln \left (\sec \left (d x +c \right )\right )\right )}{d}\) | \(63\) |
risch | \(-i a^{2} x -\frac {2 i a^{2} c}{d}-\frac {a^{2} \left (5 \,{\mathrm e}^{3 i \left (d x +c \right )}-8 \,{\mathrm e}^{2 i \left (d x +c \right )}+5 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{2 d \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )^{4}}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{4 d}+\frac {7 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{4 d}\) | \(114\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 72, normalized size = 0.85 \begin {gather*} \frac {a^{2} \log \left (\cos \left (d x + c\right ) + 1\right ) + 7 \, a^{2} \log \left (\cos \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left (5 \, a^{2} \cos \left (d x + c\right ) - 4 \, a^{2}\right )}}{\cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right ) + 1}}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.73, size = 122, normalized size = 1.44 \begin {gather*} -\frac {10 \, a^{2} \cos \left (d x + c\right ) - 8 \, a^{2} - {\left (a^{2} \cos \left (d x + c\right )^{2} - 2 \, a^{2} \cos \left (d x + c\right ) + a^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 7 \, {\left (a^{2} \cos \left (d x + c\right )^{2} - 2 \, a^{2} \cos \left (d x + c\right ) + a^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{8 \, {\left (d \cos \left (d x + c\right )^{2} - 2 \, d \cos \left (d x + c\right ) + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a^{2} \left (\int 2 \cot ^{5}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \cot ^{5}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \cot ^{5}{\left (c + d x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.55, size = 138, normalized size = 1.62 \begin {gather*} \frac {14 \, a^{2} \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - 16 \, a^{2} \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right ) - \frac {{\left (a^{2} + \frac {8 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {21 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) - 1\right )}^{2}}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.26, size = 62, normalized size = 0.73 \begin {gather*} \frac {a^2\,\left (-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{16}+\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}+\frac {7\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4}-\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________